package ie.lawlor.amvc.config;

import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.ChildBeanDefinition;
import org.w3c.dom.Element;


class TriadDefinitionParser extends AbstractTriadDefinitionParser {
    protected ChildBeanDefinition createAndRegisterTriad(Element element,
            BeanDefinitionRegistry registry) {
        ChildBeanDefinition triadBeanDefinition = createTriadBeanDefinition(element);
        String beanName = element.getAttribute(AbstractTriadDefinitionParser.ID);
        registry.registerBeanDefinition(beanName, triadBeanDefinition);
        return triadBeanDefinition;
    }
}